﻿using server.DAO;
using server.Model;
using server.Tool;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace server.Business
{
    // 入队，退队
   public  class PublishTipsMessage:CommonDao
    {

        private const string Show_Message = "ShowMessage";
        private UserRoomDao roomUser = new UserRoomDao();
        private PublishPlayerState publishPlayerState = new PublishPlayerState();
        /// <summary>
        /// 用户入队，退队
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="isJoin"></param>
        public void JoinAndExitLeader(string userName,int userId,string roomName,bool isJoin =true)
        {
            string message = userName + "加入队:" + roomName;
            if(!isJoin)
            {
                message = userName + "退出队:" + roomName;
            }
            SendNoticeMessageInGrounp(userId.ToString(), message, Show_Message);

        }
    }
}
